import scala.actors._
import scala.actors.Actor._

object Rumor

class test extends Actor {

    def act = {
        loop{
            reactWithin(1000){
                case Rumor =>
                    println("yes")
                case TIMEOUT => 
                    val x = 0.0
                    val y = 0.0
                    val xx = 0.0
                    val yy = 0.0
                    if(scala.math.abs(x/y-xx/yy) < 1E-10)
                        println("no")
            }
        }
    }
}

object test {
    def main(args: Array[String]) = {
        val a = new test()
        a.start()
        var i = 0
        while(i<=50){
            Thread.sleep(100)
            a ! Rumor
            i+=1
        }
    }
}

